<?php
/*
 * Created on 2013-6-12
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
require_once ('../../base/Upload.php');
require_once('../../base/Db.php');
require_once('../../base/Tools.php');

$babyId = $_POST['babyId_New'];
$babyName = unescape($_POST['babyName_New']);
$babyProductCate = $_POST['babyProductCate_New'];
$babyColorCate = $_POST['babyColorCate_New'];
$babyTemplateCate = $_POST['babyTemplateCate_New'];
$babySnap = unescape($_POST['babySnap_New']);
$babyDesc = unescape($_POST['babyDesc_New']);


$db = new Db();
$sql = "update template set baby_name='$babyName', baby_product_cate=$babyProductCate, baby_color_cate=$babyColorCate,";
$sql .= "baby_template_cate=$babyTemplateCate, baby_snap='$babySnap', baby_desc='$babyDesc' where id=$babyId";
if($db->execute($sql)){
	echo "1:修改成功";
}
?>
